<template>
  <el-card :bordered="false" class="addOrder avue_height">
    <el-page-header
      @back="$router.go(-1)"
      style="margin-bottom: 10px"
    ></el-page-header>
    <el-form
      :model="ruleForm"
      ref="ruleForm"
      :labelWidth="labelWidth"
      class="demo-ruleForm"
    >
      <el-row :gutter="10">
        <!-- <el-col :xs="24">
          <el-form-item label="区域图片：" ref="lmtbUpload">
            <el-upload
              action="#"
              list-type="picture-card"
              :auto-upload="true"
              :before-upload="beforeUpload"
              :on-change="handleChange"
              :file-list="fileList"
              :limit="1"
              :class="{ disUoloadSty: fileList.length }"
            >
              <i slot="default" class="el-icon-plus"></i>
              <div slot="tip" class="el-upload__tip">
                建议上传大小不超过1M，尺寸为 326*412 的图片
              </div>
              <div slot="file" slot-scope="{ file }">
                <img
                  class="el-upload-list__item-thumbnail"
                  :src="file.url"
                  alt
                />
                <span class="el-upload-list__item-actions">
                  <span
                    class="el-upload-list__item-preview"
                    @click="handlePictureCardPreview(file)"
                  >
                    <i class="el-icon-zoom-in"></i>
                  </span>
                  <span
                    class="el-upload-list__item-delete"
                    @click="delUplod(file)"
                  >
                    <i class="el-icon-delete"></i>
                  </span>
                </span>
              </div>
            </el-upload>
            <el-dialog :visible.sync="dialogVisibleImg">
              <img width="100%" :src="dialogImageUrl" alt />
            </el-dialog>
            <cropper-modal
              ref="cropperModal"
              :optionsData="optionsData"
              @ok="handleCropperSuccess"
            ></cropper-modal>
          </el-form-item>
        </el-col>
        <p>（说明：自动获取积分商品）</p> -->
        <el-form-item label="积分兑换区名称：">
          <el-input v-model="ruleForm.exchangeName" style="width: 40%" />
        </el-form-item>
        <p>（说明：只需维护名称，移动端自动获取积分商品列表）</p>
      </el-row>
      <div class="content">
        <el-button
          type="primary"
          @click="submitSave('ruleForm')"
          :loading="loadingSure"
          >{{ ruleForm.id ? "修改" : "提交" }}</el-button
        >
        <el-button @click="quxiao('ruleForm')">取消</el-button>
      </div>
    </el-form>
  </el-card>
</template>

<script src='./index.js'></script>

<style lang="scss">
.addOrder {
  .content {
    text-align: center;
    margin: 20px 0px;
    button {
      margin-right: 10px;
    }
  }
}
.uoloadSty .el-upload--picture-card {
  width: 148px;
  height: 148px;
  line-height: 146px;
}
.disUoloadSty .el-upload--picture-card {
  display: none; /* 上传按钮隐藏 */
}
</style>
